package com.yh.patterns.combination.AO;

public class Client {
    public static void main(String[] args) {
        ConcreteCompany root = new ConcreteCompany("北京总部");
        root.add(new EduOffice());
        root.add(new AdminOffice());
        ConcreteCompany comp = new ConcreteCompany("湖南分校");
        comp.add(new EduOffice());
        comp.add(new AdminOffice());
        root.add(comp);
         ConcreteCompany comp1 = new ConcreteCompany("长沙教学点");
       comp1.add(new EduOffice());
        comp1.add(new AdminOffice());
        ConcreteCompany comp2 = new ConcreteCompany("湘潭教学点");
        comp2.add(new EduOffice());
        comp2.add(new AdminOffice());
        comp.add(comp1);
        comp.add(comp2);

        root.release();
    }
}
